package com.thingsgrid.mqtthelper.service.impl;

import com.thingsgrid.appmanager.feign.AppMqttMessageFeign;
import com.thingsgrid.mqtthelper.service.MqttReceiveService;
import lombok.AllArgsConstructor;
import org.springblade.core.tool.api.R;
import org.springframework.stereotype.Service;

/**
 * 功能说明：MQTT消息接收
 *
 * @author 李龙飞
 * @since 2019/8/27 17:08
 */
@Service
@AllArgsConstructor
public class MqttReceiveMessageImpl implements MqttReceiveService {

	private AppMqttMessageFeign mqttMessageFeign;

	/**
	 *说明：分发消息
	 *@author lilongfei
	 *@since 2019/8/27 18:14
	 */
	@Override
	public Object handlerMqttMessage(String topic, String jsonData) {
		System.out.println(topic);
		mqttMessageFeign.receiveMqttMessage(topic, jsonData);
		return R.data("发送topic详情");
	}
}
